package club.justwill.single.model;

/**
 * Created by xiangnan on 15-12-26.
 */
public class ProjectType {
    public static int TYPE_NEED_RECEIVE_GOOD = 0;
    public static int TYPE_DONT_NEED_RECEIVE_GOOD=10;

    public static String getType(int type) {
        switch (type) {
            case 0 : return "NEED_RECEIVE_GOOD";
            case 10 : return "DONT_NEED_RECEIVE_GOOD";
            default : return null;
        }
    }

    public static int getTypeCode(String type) {
        if (type.equals("NEED_RECEIVE_GOOD")) {return TYPE_NEED_RECEIVE_GOOD;}
        if (type.equals("DONT_NEED_RECEIVE_GOOD")) {return TYPE_DONT_NEED_RECEIVE_GOOD;}
        return -1;
    }

    public static int TAG_TECHNOLOGY = 0;
    public static int TAG_AGRICULTURE = 10;
    public static int TAG_ENTERTAINMENT = 20;
    public static int TAG_COMMONWEAL = 30;
    public static int TAG_ART = 40;
    public static int TAG_PUBLISH = 50;
    public static int TAG_OTHER = 60;
    public static int TAG_ALL = 100;

    public static String getTags(int tag) {
        switch (tag) {
            case 0 : return "TECHNOLOGY";
            case 10 : return "AGRICULTURE";
            case 20 : return "ENTERTAINMENT";
            case 30 : return "COMMONWEAL";
            case 40 : return "ART";
            case 50 : return "TAG_PUBLISH";
            case 60 : return "TAG_OTHER";
            case 100 : return "TAG_ALL";
            default : return null;
        }
    }

    public static int getTagsCode(String tag) {
        if (tag.equals("TECHNOLOGY")) {return TAG_TECHNOLOGY;}
        if (tag.equals("AGRICULTURE")) {return TAG_AGRICULTURE;}
        if (tag.equals("ENTERTAINMENT")) {return TAG_ENTERTAINMENT;}
        if (tag.equals("COMMONWEAL")) {return TAG_COMMONWEAL;}
        if (tag.equals("ART")) {return TAG_ART;}
        if (tag.equals("PUBLISH")) {return TAG_PUBLISH;}
        if (tag.equals("OTHER")) {return TAG_OTHER;}
        if (tag.equals("ALL")) {return TAG_ALL;};
        return 100;
    }
    public static int STATUS_AUDIT_FAILED = -1;
    public static int STATUS_AUDITING = 100;
    public static int STATUS_CROW = 0;
    public static int STATUS_PREHEAT = 10;
    public static int STATUS_FINISH = 20;
    public static int STATUS_PAY_CUSTOMER = 30;
    public static int STATUS_PAY_MERCHANT =40;

    public static String getProjectType(int type) {
        switch(type) {
            case -1 : return "STATUS_AUDIT_FAILED";
            case 100 : return "STATUS_AUDITING";
            case 0 : return "STATUS_CROW";
            case 10 : return "STATUS_PREHEAT";
            case 20 : return "STATUS_FINISH";
            case 30 : return "STATUS_PAY_CUSTOMER";
            case 40 : return "STATUS_PAY_MERCHANT";
            default: return null;
        }
    }

    public static int getProjectTypeCode(String type) {
        if(type.equals("STATUS_AUDIT_FAILED")) {return STATUS_AUDIT_FAILED;}
        if(type.equals("STATUS_AUDITING")) {return STATUS_AUDITING;}
        if(type.equals("STATUS_CROW")) { return STATUS_CROW;}
        if(type.equals("STATUS_PREHEAT")) { return STATUS_PREHEAT;}
        if(type.equals("STATUS_FINISH")) { return STATUS_FINISH;}
        if(type.equals("STATUS_PAY_CUSTOMER")) { return STATUS_PAY_CUSTOMER;}
        if(type.equals("STATUS_PAY_MERCHANT")) { return STATUS_PAY_MERCHANT;}

        return 100;
    }
}
